package com.example.order.common.clients;

import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
// import org.springframework.cloud.client.loadbalancer.reactive.ReactiveLoadBalancer;
// import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClient;
// import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClients;
// import org.springframework.cloud.loadbalancer.core.RandomLoadBalancer;
// import org.springframework.cloud.loadbalancer.core.ServiceInstanceListSupplier;
// import org.springframework.cloud.loadbalancer.support.LoadBalancerClientFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.web.client.RestTemplate;

@Configuration
// @LoadBalancerClient(name = "CLOUD-PAYMENT-SERVICE", configuration = MyLoadBalancerConfigure.class)//就是这类的名字，别改了
// @LoadBalancerClients(defaultConfiguration = MyLoadBalancerConfigure.class)
public class HttpClientConfigure {
	@Bean
	@LoadBalanced
	public RestTemplate restTemplate(){
		return  new RestTemplate();
	}




}
